package com.laozhao.snow;


import java.util.List;

import javax.lang.model.element.Element;
import javax.sql.DataSource;


/**
 * 
	<!ELEMENT system (dataSource+,property*,splash?,frame+,part+,tray?)>
	<!ATTLIST system id ID #REQUIRED name CDATA #REQUIRED icon CDATA description CDATA skin CDATA version CDATA>
 * @author zdongmen
 *
 */
public interface System extends BaseNode{

	public static final String ATTRIBUTE_NODE_NAME = "system";
	
	public static final String ATTRIBUTE_SYSTEM_SKIN = "skin"; 
	public static final String ATTRIBUTE_SYSTEM_VERSION = "version";

	public static final String ELEMENT_SYSTEM_DATASOURCE = "dataSource";
	public static final String ELEMENT_SYSTEM_SPLASH = "splash";
	public static final String ELEMENT_SYSTEM_FRAME = "frame";
	public static final String ELEMENT_SYSTEM_PART = "part";
	public static final String ELEMENT_SYSTEM_TRAY = "tray";
	
	// attribute
//	/**
//	 * get system name
//	 * @return system name
//	 */
//	public String getName();
//	
//	/**
//	 * set system name
//	 * @param system name
//	 */
//	public void setName(String name);

	/**
	 * get system skin
	 * @return system skin
	 */
	public String getSkin();
	
	/**
	 * set system skin
	 * @param system skin
	 */
	public void setSkin(String skin);

	/**
	 * get system version
	 * @return system version
	 */
	public String getVersion();
	
	/**
	 * set system version
	 * @param system version
	 */
	public void setVersion(String version);
	
	// Method
	/**
	 * get system DataSource
	 * @param id DataSource id
	 * @return system DataSource
	 */
	public DataSource getDataSource(String id);
	
	/**
	 * get system DataSource
	 * @param system DataSource
	 */
	public void setDataSource(DataSource dataSource);
	

	/**
	 * get system splash
	 * @return system splash
	 */
	public Splash getSplash();
	
	/**
	 * to show the splash
	 * set system splash
	 * @param system splash
	 */
	public void setSplash(Splash splash);

	/**
	 * get system frame
	 * @return system frame
	 */
	public Frame getFrame(String id);
	
	/**
	 * set system frame
	 * @param system frame
	 */
	public void setFrame(Frame frame);
	
	/**
	 * get system part
	 * @return system part
	 */
	public Part getPart(String id);
	
	/**
	 * set system part
	 * @param system part
	 */
	public void setPart(Part part);	

	/**
	 * get system tray
	 * @return system tray
	 */
	public Tray getTray();
	
	/**
	 * set system tray
	 * @param system tray
	 */
	public void setTray(Tray tray);

	public void init(List<Element> fileList);
	
	public void star();
	
	public void stop();
}
